/*
 * AuthentificationFacade.java
 *
 * Created on 1 2007 2:04
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package com.persistent.model.facade;

import com.persistent.entity.Authentification;
import com.persistent.model.AbstractFacadeImpl;
import java.util.List;
import javax.transaction.HeuristicMixedException;
import javax.transaction.HeuristicRollbackException;
import javax.transaction.NotSupportedException;
import javax.transaction.RollbackException;
import javax.transaction.SystemException;
/**
 *
 * @author alexog
 */
public class AuthentificationFacade extends AbstractFacadeImpl<Authentification> {
    
    /**
     * Creates a new instance of AuthentificationFacade
     */
    public AuthentificationFacade() {
        super();
    }

    public void create(Authentification auth){
        etx.begin();
        em.persist(auth);
        etx.commit();
    }

    public Authentification find(Authentification auth) {
        return null;
    }

    public List<Authentification> findAll() {
        return null;
    }

    public void update(Authentification auth) {
    }
    
    public Authentification findByUsername(String username) {
        Authentification auth = (Authentification) em.createNamedQuery(
                                "Authentification.findByUsername").setParameter("username"
                                                                                ,username).getSingleResult();
        return auth;
    }
    
}
